package com.pgeg.mixin.entity;

import com.pgeg.listener.EntityListener;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnRestriction;
import net.minecraft.entity.mob.MobEntity;
import net.minecraft.entity.passive.ParrotEntity;
import net.minecraft.world.Heightmap;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

@Mixin(SpawnRestriction.class)
public class FutaCowWorldSpawnMixin {

    @Shadow
    private static <T extends MobEntity> void register(EntityType<T> type, SpawnRestriction.Location location, Heightmap.Type heightmapType, SpawnRestriction.SpawnPredicate<T> predicate) {}

    static {
        register(EntityListener.FUTA_COW, SpawnRestriction.Location.ON_GROUND, Heightmap.Type.WORLD_SURFACE, ParrotEntity::canMobSpawn);
    }

}
